#include <stdio.h>
// 形参是普通变量，传值进来时，需要数据
void changeVal(int a, int b){
    int temp=0;
    temp = a;
    a = b;
    b = temp;
    printf("a=%d,b=%d\n",a,b);
} 
// 形参是指针，传值进来时，需要地址
void changeVal1(int *a, int *b){
    int temp=0;
    temp = *a;
    *a = *b;
    *b = temp;
    printf("a=%d,b=%d\n",*a,*b);
}

int main(void){
    int num1 = 10,num2 = 20;
    changeVal1(&num1,&num2);// 交换俩变量
    printf("num1=%d,num2=%d\n",num1,num2);

    return 0;
}